# # # Prepare data for RSiena.
# # # create dependent variable(s)
negPtas <- sienaNet(array(c(negativelistnet94, negativelistnet95, negativelistnet96, negativelistnet97, negativelistnet98,negativelistnet99, negativelistnet00, negativelistnet01, negativelistnet02, negativelistnet03, negativelistnet04, negativelistnet05, negativelistnet06, negativelistnet07, negativelistnet08, negativelistnet09, negativelistnet10, negativelistnet11),
                          dim = c(53, 53, 18) ))
posPtas <- sienaNet(array(c(poslistnet94, poslistnet95, poslistnet96, poslistnet97, poslistnet98, poslistnet99, poslistnet00, poslistnet01, poslistnet02, poslistnet03, poslistnet04, poslistnet05, poslistnet06, poslistnet07, poslistnet08, poslistnet09, poslistnet10, poslistnet11),
                          dim = c(53, 53, 18) ))
# # 
# # create monadic constant covariates
gatsCommitments <- coCovar(serviLibGats)

# # # create monadic time varying covariates
Democracy <- varCovar(democ)
Income <- varCovar(gdp)
CapIncome <- varCovar(gdpCap)
usAlliance <- varCovar(usAlly)
lnUsTrade <- varCovar(usTrade)
lnChnTrade <- varCovar(chnTrade)
servicesTrade <- varCovar(tradeServicesInGdp)
servicesValueAdded <- varCovar(valueAddedServicesGdp)
fdi <- varCovar(fdiShare)
usFdi <- varCovar(lnUsFdiServices)
# create constant dyadic covariate
Distance  <- coDyadCovar(dist)
CommonLanguage <- coDyadCovar(comLang)
CommonLegalOrigin <- coDyadCovar(comLegOrig)
# 
Trade   <- varDyadCovar(array( c(Trade94, Trade95, Trade96, Trade97, Trade98,
                                 Trade99, Trade00, Trade01, Trade02, Trade03, Trade04, Trade05, Trade06, Trade07, Trade08, Trade09, Trade10,Trade10),
                               dim = c(53, 53, 17) ))
GoodsPta   <- varDyadCovar(array( c(GoodsPta94, GoodsPta95, GoodsPta96, GoodsPta97, GoodsPta98,
                                    GoodsPta99, GoodsPta00, GoodsPta01, GoodsPta02, GoodsPta03, GoodsPta04, GoodsPta05, GoodsPta06, GoodsPta07, GoodsPta08, GoodsPta09, GoodsPta10,GoodsPta10),
                                  dim = c(53, 53, 17) ))
BitInForce   <- varDyadCovar(array( c(bit94, bit95, bit96, bit97, bit98,
                                      bit99, bit00, bit01, bit02, bit03,
                                      bit04, bit05, bit06, bit07, bit08,
                                      bit09, bit10,bit10),
                                    dim = c(53, 53, 17) ))
BitInForceEu3   <- varDyadCovar(array( c(euBit94, euBit95, euBit96, euBit97, euBit98,
                                         euBit99, euBit00, euBit01, euBit02, euBit03,
                                         euBit04, euBit05, euBit06, euBit07, euBit08,
                                         euBit09, euBit10,euBit10),
                                       dim = c(53, 53, 17) ))

# # # define data
multiPtaData <- sienaDataCreate(negPtas, posPtas, Democracy, Income, CapIncome, Distance, 
                                Trade, GoodsPta, lnUsTrade, lnChnTrade, usAlliance, servicesTrade, 
                                servicesValueAdded, fdi, usFdi, CommonLanguage, 
                                CommonLegalOrigin, gatsCommitments, BitInForce, BitInForceEu3)
# create effects structure
multiPtaEff <- getEffects(multiPtaData)